<script type="text/javascript" src="<?php echo $this->lib_base . "/" . 'goodsinfo.js'; ?>" charset="utf-8"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=<?php echo $this->_var['baidu_ak']; ?>"></script>
<script type="text/javascript">
    var market_ratio=<?php echo $this->_var['goods']['market_price']; ?>/<?php echo $this->_var['goods']['_specs']['0']['price']; ?>;
//<!CDATA[
    /* buy */
    function buy()
    {
        if (goodsspec.getSpec() == null)
        {
            alert(lang.select_specs);
            return;
            }
            var spec_id = goodsspec.getSpec().id;

            var quantity = $("#quantity").val();
            if (quantity == '')
            {
                alert(lang.input_quantity);
                return;
            }
            if (parseInt(quantity) < 1) {
                alert(lang.invalid_quantity);
                return;
            }
            add_to_cart(spec_id, quantity);
        }
        /* add cart */
        function add_to_cart(spec_id, quantity)
        {
            var url = SITE_URL + '/index.php?app=cart&act=add';
            $.getJSON(url, {'spec_id': spec_id, 'quantity': quantity}, function(data) {
                if (data.done)
                {
                    $('.bold_num').text(data.retval.cart.kinds);
                    $('.bold_mly').html(price_format(data.retval.cart.amount));
                    $('.ware_cen').slideDown('slow');
                    setTimeout(slideUp_fn, 5000);
                }
                else
                {
                    alert(data.msg);
                }
            });
        }

        /*buy_now*/
        function buy_now()
        {
            //验证数据
            if (goodsspec.getSpec() == null)
            {
                alert(lang.select_specs);
                return;
            }
            var spec_id = goodsspec.getSpec().id;

            var quantity = $("#quantity").val();
            if (quantity == '')
            {
                alert(lang.input_quantity);
                return;
            }
            if (parseInt(quantity) < 1)
            {
                alert(lang.invalid_quantity);
                return;
            }
            check_info();
            buy_now_add_cart(spec_id, quantity);
        }
        
//      lichen 2019/4/11 start
		//验证身份信息
		function check_info(){
			var url = SITE_URL + '/index.php?app=member&act=check_info';
            $.getJSON(url, {'constructor': ''}, function(data) {
            	console.log(data)
                if (data)
                {
//                  $('.bold_num').text(data.retval.cart.kinds);
//                  $('.bold_mly').html(price_format(data.retval.cart.amount));
//                  $('.ware_cen').slideDown('slow');
//                  setTimeout(slideUp_fn, 5000);
                }
                else
                {
                    var url = SITE_URL + '/index.php?app=member&act=profile';
                    setTimeout(function(){//两秒后跳转
                    	alert('请先完善身份信息');
					    location.href = url;
				    },2000);
                    return;
                }
            });
		}
//		lichen 2019/4/11 end

        /* add buy_now_add_cart */
        function buy_now_add_cart(spec_id, quantity)
        {
            var url = SITE_URL + '/index.php?app=order&goods=single&store_id=<?php echo $this->_var['store']['store_id']; ?>&share_id=<?php echo $_GET['share_id']; ?>&spec_id='+spec_id+'&quantity='+quantity;
            location.href=url;return;
        }




var specs = new Array();
<?php $_from = $this->_var['goods']['_specs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'spec');if (count($_from)):
    foreach ($_from AS $this->_var['spec']):
?>
<?php if ($this->_var['spec']['is_pro']): ?>
    // lichen 2019/4/17 start
specs.push(new spec(<?php echo $this->_var['spec']['spec_id']; ?>, '<?php echo htmlspecialchars($this->_var['spec']['spec_1']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_2']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_3']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_4']); ?>', <?php echo $this->_var['spec']['price']; ?>,<?php echo $this->_var['spec']['tax_price']; ?>,<?php echo $this->_var['spec']['pro_price']; ?>, <?php echo $this->_var['spec']['stock']; ?>, true,<?php echo ($this->_var['spec']['discount'] == '') ? '0' : $this->_var['spec']['discount']; ?>));
    // specs.push(new spec(<?php echo $this->_var['spec']['spec_id']; ?>, '<?php echo htmlspecialchars($this->_var['spec']['spec_1']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_2']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_3']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_4']); ?>', <?php echo $this->_var['spec']['price']; ?>,<?php echo $this->_var['spec']['pro_price']; ?>, <?php echo $this->_var['spec']['stock']; ?>,true,<?php echo ($this->_var['spec']['discount'] == '') ? '0' : $this->_var['spec']['discount']; ?>));
    // lichen 2019/4/17 end
<?php else: ?>
    console.log(spec)
    // lichen 2019/4/17 start
specs.push(new spec(<?php echo $this->_var['spec']['spec_id']; ?>, '<?php echo htmlspecialchars($this->_var['spec']['spec_1']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_2']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_3']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_4']); ?>', <?php echo $this->_var['spec']['price']; ?> ,<?php echo $this->_var['spec']['tax_price']; ?>,0, <?php echo $this->_var['spec']['stock']; ?>, false,<?php echo ($this->_var['spec']['discount'] == '') ? '0' : $this->_var['spec']['discount']; ?>));
    // specs.push(new spec(<?php echo $this->_var['spec']['spec_id']; ?>, '<?php echo htmlspecialchars($this->_var['spec']['spec_1']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_2']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_3']); ?>', '<?php echo htmlspecialchars($this->_var['spec']['spec_4']); ?>', <?php echo $this->_var['spec']['price']; ?>,0, <?php echo $this->_var['spec']['stock']; ?>,false,<?php echo ($this->_var['spec']['discount'] == '') ? '0' : $this->_var['spec']['discount']; ?>));
// lichen 2019/4/17 end
<?php endif; ?>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
var specQty = <?php echo $this->_var['goods']['spec_qty']; ?>;
var defSpec = <?php echo htmlspecialchars($this->_var['goods']['default_spec']); ?>;
var goodsspec = new goodsspec(specs, specQty, defSpec);

//]]>

    function decrease_quantity() {
        var item = $('#quantity');
        var orig = Number(item.val());
        if (orig > 1) {
            item.val(orig - 1);
            item.keyup();
        }
    }
    function add_quantity() {
        var item = $('#quantity');
        var orig = Number(item.val());
        item.val(orig + 1);
        item.keyup();
    }
    
                var shippings = <?php echo $this->_var['shippings']; ?>;

    $(function(){
    	var myCity = new BMap.LocalCity();
    	myCity.get(myFun);
        get_shipping_fee();

    })
	function myFun(result){
		var cityName = result.name;
		
        $.getJSON('index.php?app=goods&act=get_region_id&region_name='+cityName,function(result){
      		if(result.done){
      			var region_id=result.retval.region_id;
				var layer=result.retval.layer;
				if(region_id && layer){
					var html='';
					var region_name=result.retval.region_name;
					var i=0;
					for(var key in region_name){
						i++;
						var active='';
						if(!result.retval.son_flag && i==layer){
							active='class="active"';
						}
						html+='<a href="javascript:void(0)" onclick="change_region('+i+','+key+',\''+region_name[key]+'\')" '+active+'>'+region_name[key]+'</a>';
					}

                        if(result.retval.son_flag){
                        	html+='<a href="javascript:void(0)" class="active">请选择</a>';
                        }
                        
                        html+='<div class="clear"></div>';
					$(".region_content .mt").html(html);
					change_region(layer,region_id,cityName);
			
				}
      		}
          });
	}
    function change_region(layer,region_id,region_name){

        layer && $(".region_content .mt a:eq("+(layer-1)+")").text(region_name);
        $("#region_names").text('');
        $(".region_content .mt a").each(function(){
            if(($(this).index()+1)>layer){
                $(this).remove();
            }else{
                $("#region_names").text($("#region_names").text()+$(this).text()+' ');
            }
        });
        
        var url = REAL_SITE_URL + '/index.php?app=mlselection&type=region';
        $.getJSON(url, {'pid': region_id}, function(data) {
            if (data.done)
            {
                if (data.retval.length > 0)
                {
                    if($(".region_content .mt a").length>0){
                        $(".region_content .mt a:last").after('<a href="javascript:void(0)" class="active">请选择</a>');
                    }else{
                        $(".region_content .mt").prepend('<a href="javascript:void(0)" class="active">请选择</a>');
                        $("#region_names").text("请选择");
                    }
                    $(".region_content .mc").html('');
                    var data = data.retval;
                    for (i = 0; i < data.length; i++)
                    {
                        $(".region_content .mc").append('<a href="javascript:void(0)" onclick="change_region('+(layer+1)+','+data[i].region_id+',\''+ data[i].region_name +'\')">'+ data[i].region_name +'</a>');
                    }
                    $(".region_content .mc").append('<div class="clear"></div>');
                }
                $(".region_content .mt a").removeClass('active');
                $(".region_content .mt a:last").addClass('active');
            }
            else
            {
                alert(data.msg);
            }
        });
        $("#region_id").val(region_id);
        get_shipping_fee();
    }
function get_shipping_fee(){
    for(shipping_id in shippings){
        
    
                    var shipping_data = shippings[shipping_id];
                    var first_price   = Number(shipping_data['first_price']);
                    var step_price   = Number(shipping_data['step_price']);
                    var _shipping_fee=0;
                    var cod_regions_price=shippings[shipping_id]['cod_regions_price'];
                    
                  //获取地区价格
                  var ajex_region_id;

                  ajex_region_id=$("#region_id").val();
                  
                  	var suitble_region=0;
                  for(var r_p in cod_regions_price){
                  	var region_price_array;
                    if(ajex_region_id==r_p){
                        
                        region_price_array=cod_regions_price[r_p].split(",");
                        step_price = parseFloat(region_price_array[2]);
                        if(isNaN(step_price)){
                            step_price=0;
                        }
                        if(!isNaN(parseFloat(region_price_array[1]))){
                        first_price=parseFloat(region_price_array[1]);
                        
                            break;
                        }

                       
                    }
                    
                   //获取地区的子孙
                   $.ajaxSettings.async = false; 
                      $.getJSON('index.php?app=mlselection&act=ajax_get_region_descendant&id='+r_p,function(result){
                  		if(result.done){
                  			var ids=result.retval;
                  			if($.inArray(ajex_region_id,ids)>-1){
                                  region_price_array=cod_regions_price[r_p].split(",");

                                  if((suitble_region==0) || (ids.length <suitble_region))
                                  {
                                      suitble_region=ids.length;
                        if(!isNaN(parseFloat(region_price_array[1]))){
                        first_price=parseFloat(region_price_array[1]);
                        
                        }
                                      
                                        step_price = parseFloat(region_price_array[2]);
                                        if(isNaN(step_price)){
                                            step_price=0;
                                        }
                                  }
                  			}
                  			
                  		}
                      });
                      
                  }

                
        var item = $('#quantity');
        var orig = Number(item.val());
        if(isNaN(orig)){
        orig=1;
        }
        if(orig<1){
        orig=1;
        }
                          var goods_shipping_fee=ForDight(first_price + (orig - 1) * step_price,2);
                          
                          
                          
                              $("#goods_shipping_"+shipping_id).text(price_format(goods_shipping_fee));
                          }                 
}
function   ForDight(Dight,How)  
{  
            Dight   =   Math.round   (Dight*Math.pow(10,How))/Math.pow(10,How);  
            return   Dight;  
}



</script>

<div class="ware_info">
    <div class="ware_pic">
        <div class="big_pic">
            <a href="javascript:;"><span class="jqzoom"><img src="<?php echo ($this->_var['goods']['_images']['0']['thumbnail'] == '') ? $this->_var['default_image'] : $this->_var['goods']['_images']['0']['thumbnail']; ?>" width="400" height="400" jqimg="<?php echo $this->_var['goods']['_images']['0']['image_url']; ?>" /></span></a>
        </div>

        <div class="bottom_btn">
            <!--<a class="collect" href="javascript:collect_goods(<?php echo $this->_var['goods']['goods_id']; ?>);" title="收藏该商品"></a>-->
            <div class="left_btn"></div>
            <div class="right_btn"></div>
            <div class="ware_box">
                <ul>
                    <?php $_from = $this->_var['goods']['_images']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods_image');$this->_foreach['fe_goods_image'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_goods_image']['total'] > 0):
    foreach ($_from AS $this->_var['goods_image']):
        $this->_foreach['fe_goods_image']['iteration']++;
?>
                    <li <?php if (($this->_foreach['fe_goods_image']['iteration'] <= 1)): ?>class="ware_pic_hover"<?php endif; ?> bigimg="<?php echo $this->_var['goods_image']['image_url']; ?>"><img src="<?php echo $this->_var['goods_image']['thumbnail']; ?>" width="64" height="64" /></li>
                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                </ul>
            </div>
        </div>
    </div>

    <div class="ware_text">
        <h2 class="ware_title"><?php echo htmlspecialchars($this->_var['goods']['goods_name']); ?></h2>
        <h3 class="goods_subname"><?php echo htmlspecialchars($this->_var['goods']['goods_subname']); ?></h3>
        
        <div class="ware_price">
            <?php if ($this->_var['goods']['market_price'] > 0): ?>
            <dl class="clearfix">
                <dt>市场价：</dt>
                <dd ectype="market_price" class="market_price"><?php echo price_format($this->_var['goods']['market_price']); ?></dd>
            </dl>
			<div style="clear:both;height:0; display:block; overflow:hidden"></div>
            <?php endif; ?>
            <dl class="clearfix">
                <dt>价格：</dt>
                <dd ectype="goods_price" class="goods_price"><?php echo price_format($this->_var['goods']['_specs']['0']['price']); ?></dd>
            </dl>
            
            <dl class="clearfix relative">
                <dt>税费：</dt>
                <dd ectype="tax_price" class=""><?php echo price_format($this->_var['goods']['_specs']['0']['tax_price']); ?></dd>


                <!--<span class="float-right span_tax_explain">税费收取规则：</span>-->
                <!--<b class="icon"></b>-->

            </dl>










            <div class="parent_tax_explain">
                <b class="float-right icon"></b>
                <span class="float-right span_tax_explain">税费收取规则：</span>

                <div style="clear: both;"></div>
                <div class="div_tax_explain">
                    税费=购买单价 * 件数 * 税负率</br>
                    优惠券抵扣金额、商品运费均需要计税</br>
                    注：不同商品的适用税负率不同，<a href="https://you.kaola.com/footer/index.html?key=footer_pricelist&hcAntiCheatSwitch=0&anstipamActiCheatSwitch=1&anstipamActiCheatToken=ee7b2ce7910f4e04ac89bbdae1871d04&anstipamActiCheatValidate=anstipam_acti_default_validate">了解税率</a>
                </div>
            </div>







            <!--<div class="float-right div_tax_explain" style="display: none">-->
                <!--税费=购买单价 * 件数 * 税负率</br>-->
                <!--优惠券抵扣金额、商品运费均需要计税</br>-->
                <!--注：不同商品的适用税负率不同，<a>了解税率</a>-->
            <!--</div>-->

            

       <div style="clear:both;height:0; display:block; overflow:hidden"></div>
            <dl class="clearfix" ectype="is_pro" style="<?php if (! $this->_var['goods']['_specs']['0']['is_pro']): ?>display:none<?php endif; ?>">
                <dt>促销价：</dt>
                <dd>
                    <span class="pro_price" ectype="goods_pro_price"><?php echo price_format($this->_var['goods']['_specs']['0']['pro_price']); ?></span>
                    <em class="pro_name" title="<?php echo $this->_var['goods']['pro_desc']; ?>"><?php echo $this->_var['goods']['pro_name']; ?></em>
                    <div class="countdown J_Countdown_GoodsPromotion">
                        <span class="lefttime">还剩</span>
                        <span class="flip-top J_NumDays"><?php echo $this->_var['goods']['lefttime']['d']; ?></span><em>天</em>
                        <span class="flip-top J_NumHours"><?php echo $this->_var['goods']['lefttime']['h']; ?></span><em>小时</em>
                        <span class="flip-top J_NumMins"><?php echo $this->_var['goods']['lefttime']['m']; ?></span><em>分</em>
                        <span class="flip-top J_NumSeconds"><?php echo $this->_var['goods']['lefttime']['s']; ?></span><em>秒</em>
                    </div>
                </dd>
            </dl>
      <div style="clear:both;height:0; display:block; overflow:hidden"></div>
            <?php if ($this->_var['goods']['if_open']): ?>
            <dl class="clearfix">
                <dt>会员价：</dt>
                <dd>
                    <?php if ($this->_var['visitor']['user_id']): ?>
                    <span class="member_price" ectype="member_price"><?php echo price_format($this->_var['goods']['_specs']['0']['member_price']); ?></span><em class="grade_name" title="<?php echo $this->_var['goods']['grade_name']; ?>"><?php echo $this->_var['goods']['grade_name']; ?></em>
                    <?php else: ?>
                    <em class="grade_name" >登录后查看是否享受该优惠</em>
                    <?php endif; ?>
                </dd>
            </dl>
			<div style="clear:both;height:0; display:block; overflow:hidden"></div>
            <?php endif; ?>
            <?php if ($this->_var['store']['enable_free_fee'] || $this->_var['goods']['integral_max_exchange_money']): ?>
            <dl class="clearfix">
                <dt>商品优惠：</dt>
                <dd>
                    <?php if ($this->_var['store']['enable_free_fee']): ?>
                    <div  class="notice">
                        <em>满包邮</em>
                        <?php if ($this->_var['store']['amount_for_free_fee'] != '0.00'): ?><span>满<?php echo price_format($this->_var['store']['amount_for_free_fee']); ?>元包邮</span><?php endif; ?>
                        <?php if ($this->_var['store']['acount_for_free_fee']): ?><span>满<?php echo htmlspecialchars($this->_var['store']['acount_for_free_fee']); ?>件包邮</span><?php endif; ?>
                    </div>
                    <?php endif; ?>
                    <?php if ($this->_var['goods']['integral_max_exchange_money']): ?>
                    <div  class="notice"><em>积分抵扣</em><span>积分可抵<?php echo $this->_var['goods']['integral_max_exchange_money']; ?>元</span></div>
                    <?php endif; ?>
                </dd>
            </dl>
			<div style="clear:both;height:0; display:block; overflow:hidden"></div>
            <?php endif; ?>
        </div>
        
        <div class="rate">
            <?php if ($this->_var['goods']['brand']): ?>
            <dl class="clearfix">
                <dt>品牌: </dt>
                <dd><?php echo htmlspecialchars($this->_var['goods']['brand']); ?></dd>
            </dl>
			<div style="clear:both;height:0; display:block; overflow:hidden"></div>
            <?php endif; ?>
            <?php if ($this->_var['goods']['tags']): ?>
            <dl class="clearfix">
                <dt>标签(TAG): </dt>
                <dd><?php $_from = $this->_var['goods']['tags']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'tag');if (count($_from)):
    foreach ($_from AS $this->_var['tag']):
?><?php echo $this->_var['tag']; ?>&nbsp;&nbsp;&nbsp;<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?></dd>
            </dl>
			<div style="clear:both;height:0; display:block; overflow:hidden"></div>
            <?php endif; ?>
            <dl class="clearfix">
                <dt>销售情况：</dt>
                <dd><?php echo $this->_var['sales_info']; ?><?php echo $this->_var['comments']; ?></dd>
            </dl>
			<div style="clear:both;height:0; display:block; overflow:hidden"></div>
            <dl class="clearfix">
                <dt>运费：</dt>
                <dd class="about_shipping">
                    <div class="float-left">从&nbsp;<?php echo htmlspecialchars($this->_var['store']['region_name']); ?>&nbsp;到</div>
                 <div class="float-left region_wrap">
                 <div class="region_names"><span id="region_names"><?php echo ($this->_var['region_names'] == '') ? '请选择' : $this->_var['region_names']; ?></span><b class="icon"></b>
                 <div class="region_content">
                         <div class="mt clearfix">
                           <?php $_from = $this->_var['region_array']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'name');$this->_foreach['fe_name'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_name']['total'] > 0):
    foreach ($_from AS $this->_var['key'] => $this->_var['name']):
        $this->_foreach['fe_name']['iteration']++;
?> 
                           <a href="javascript:void(0)" onclick="change_region(<?php echo $this->_foreach['fe_name']['iteration']; ?>,<?php echo $this->_var['key']; ?>,'<?php echo $this->_var['name']; ?>')" <?php if ($this->_var['region_len'] == $this->_var['region_array']['length'] && $this->_foreach['last']): ?>class="active"<?php endif; ?>><?php echo $this->_var['name']; ?></a>
                           <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                           <?php if ($this->_var['region_len'] > $this->_foreach['fe_name']['total']): ?>
                           <a href="javascript:void(0)" class="active">请选择</a>
                           <?php endif; ?>
                           
                            <div class="clear"></div>
                     </div>
                     <div class="float-right" style="position: relative;top:-40px;"><a style="font-weight: bold;color:gray" href="javascript:void(0)" onclick="change_region(0,0,'请选择')">更换省份</a></div>
                     <div class="mc clearfix">
                         <?php $_from = $this->_var['regions']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'region');if (count($_from)):
    foreach ($_from AS $this->_var['region']):
?>  
                         <a href="javascript:void(0)" onclick="change_region(<?php echo $this->_var['region_len']; ?>,<?php echo $this->_var['region']['id']; ?>,'<?php echo $this->_var['region']['value']; ?>')"><?php echo $this->_var['region']['value']; ?></a>
                         <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                         <div class="clear"></div>
                    </div>
                    </div>
                 </div>

                 </div>
                <div class="float-left">
                    <div class="shipping_wrap">
                      <?php $_from = $this->_var['shipping_methods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'shipping_method');$this->_foreach['shipping_select'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['shipping_select']['total'] > 0):
    foreach ($_from AS $this->_var['shipping_method']):
        $this->_foreach['shipping_select']['iteration']++;
?>
                <ul class="shipping_item" shipping_id="<?php echo $this->_var['shipping_method']['shipping_id']; ?>">
                 <li<?php if (($this->_foreach['shipping_select']['iteration'] <= 1) && $this->_foreach['shipping_select']['total'] > 1): ?> class="relative"<?php endif; ?>>
                     <div class="float-left">
                        <?php echo htmlspecialchars($this->_var['shipping_method']['shipping_name']); ?>
                        <span ectype="shipping_fee" id="goods_shipping_<?php echo $this->_var['shipping_method']['shipping_id']; ?>">&yen; 0.00</span>
                     </div>
                     
                        <?php if (($this->_foreach['shipping_select']['iteration'] <= 1) && $this->_foreach['shipping_select']['total'] > 1): ?><b class="icon"></b><?php endif; ?>
                        
                 <div class="clear"></div>    
                 </li>
                 </ul>
                      
                 <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

                 </div>
                 
                 </div>
<input type="hidden" class="mls_id" name="region_id" id="region_id" value="<?php echo $this->_var['last_region']; ?>"/>
<div style="clear:both;height:0; display:block; overflow:hidden"></div>
                </dd>
            </dl>
			<div style="clear:both;height:0; display:block; overflow:hidden"></div>
        </div>

        <div class="handle">
            <?php if ($this->_var['goods']['spec_name_1']): ?>
            <ul id='handle_1'>
                <li class="handle_title"><?php echo htmlspecialchars($this->_var['goods']['spec_name_1']); ?>: </li>
            </ul>
            <?php endif; ?>
            <?php if ($this->_var['goods']['spec_name_2']): ?>
            <ul id='handle_2'>
                <li class="handle_title"><?php echo htmlspecialchars($this->_var['goods']['spec_name_2']); ?>: </li>
            </ul>
            <?php endif; ?>
            <?php if ($this->_var['goods']['spec_name_3']): ?>
            <ul id='handle_3'>
                <li class="handle_title"><?php echo htmlspecialchars($this->_var['goods']['spec_name_3']); ?>: </li>
            </ul>
            <?php endif; ?>
            <?php if ($this->_var['goods']['spec_name_4']): ?>
            <ul id='handle_4'>
                <li class="handle_title"><?php echo htmlspecialchars($this->_var['goods']['spec_name_4']); ?>: </li>
            </ul>
            <?php endif; ?>
            <ul>
                <li class="handle_title">购买数量: </li>
                <li class="num">
                    
                    <!--<a class="reduce" href="javascript:decrease_quantity()">-</a>-->
                    <input type="text"  name="" id="quantity" value="1" disabled/>
                    <!--<a class="increase" href="javascript:add_quantity()">﹢</a>-->
                    <!--<a class="reduce" href="javascript:decrease_quantity()">-</a>-->
                    <!--<input type="text"  name="" id="quantity" value="1" />-->
                    <!--<a class="increase" href="javascript:add_quantity()">﹢</a>-->
                    
                </li>
                <li class="stock">
                    （库存<span class="stock" ectype="goods_stock"><?php echo $this->_var['goods']['_specs']['0']['stock']; ?></span>件）
                </li>
            </ul>
            <?php if ($this->_var['goods']['spec_qty'] > 0): ?>
            <ul>
                <li class="handle_title">您已选择: </li>
                <li class="aggregate" ectype="current_spec"></li>
            </ul>
            <?php endif; ?>
        </div>

        <ul class="ware_btn clearfix">
            <div class="ware_cen" style="display:none">
                <div class="ware_center">
                    <h1>
                        <span class="dialog_title">商品已成功添加到购物车</span>
                        <span class="close_link" title="关闭" onmouseover="this.className = 'close_hover'" onmouseout="this.className = 'close_link'" onclick="slideUp_fn();"></span>
                    </h1>
                    <div class="ware_cen_btn">
                        <p class="ware_text_p">购物车内共有 <span class="bold_num">3</span> 种商品 共计 <span class="bold_mly">658.00</span></p>
                        <p class="ware_text_btn">
                            <input type="submit" class="btn1" name="" value="查看购物车" onclick="location.href = '<?php echo $this->_var['site_url']; ?>/index.php?app=cart'" />
                            <input type="submit" class="btn2" name="" value="继续挑选商品" onclick="$('.ware_cen').css({'display':'none'});" />
                        </p>
                    </div>
                </div>
                <div class="ware_cen_bottom"></div>
            </div>

            <li class="btn_c1" title="立刻购买"><a href="javascript:buy_now();">立即购买</a></li>
            
            <!--<li class="btn_c2" title="加入购物车"><a href="javascript:buy();">加入购物车</a></li>-->
            
            <!--<li class="btn_c3" title="收藏该商品"><a href="javascript:collect_goods(<?php echo $this->_var['goods']['goods_id']; ?>);"></a></li>-->
            <li><a href="javascript:void();" class="btn_phone">
                <em></em>去手机购买
                <div class="phone_qrcode"><span class="arr"></span>
                    <div class="qrcode"><?php echo $this->_var['goods']['scan_code']; ?></div>
                </div>
            </a></li>
        </ul>
        <div class="detail_pay"><em class="metatit">支付方式：</em>
            <span>支付宝</span><i class="vline">|</i><span>网上银行</span>
        </div>

        <div class="detail_action">
            <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
                <span class="bds_more">分享该商品</span>
            </div>
            <script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=6780915" src="http://bdimg.share.baidu.com/static/js/bds_s_v2.js?cdnversion=390773"></script>
            <span class="favorite_area"><a id="js_add_fav_btn" href="javascript:<?php if ($this->_var['if_collected']): ?>un<?php endif; ?>collect_goods(<?php echo $this->_var['goods']['goods_id']; ?>);" class="collect_btn <?php if ($this->_var['if_collected']): ?>active<?php endif; ?>">收藏该商品</a></span>
        </div>
    </div>
    <div class="clear"></div>
</div>
<style>
    .ware_price {
        position: relative;
    }
    .parent_tax_explain {
        padding: 1px 5px;
        position: absolute;
        top:80px;
        right:0;
        z-index:9999;
        height: 16px;
        overflow: hidden;
    }
    .parent_tax_explain:hover {
        height: auto;
        border: 1px solid;
        border-color: rgb(217,27,29);
    }
    .parent_tax_explain .span_tax_explain {
        margin-right:0;
    }
    .parent_tax_explain .icon {
        display: block;
        /*position: absolute;*/
        /*right: 5px;*/
        /*top: 12px;*/
        width: 0;
        height: 0;
        margin-top: 4px;
        margin-right:20px;
        border: 4px solid;
        border-color: #999 transparent transparent transparent;
    }
    .div_tax_explain a{
        color: #0e92d0;
        text-decoration:underline;
    }
</style>